Demo Finish

This commit is contained in:
h z
2024-06-27 04:16:35 +08:00
parent b8af5f3ccd
commit 8703f92b4e
8 changed files with 75 additions and 30 deletions

View File

@@ -1,9 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Godot;
using VirtualChemDemo;
using VirtualChemDemo.Concepts;
using VirtualChemistry.Chemistry.Atoms.Implements;
using VirtualChemistry.Chemistry.Atoms.Resolver;
@@ -19,13 +17,14 @@ public partial class CompoundConstructor : Panel
public BaseBond ConnectPending { get; set; } = BaseBond.Null;
public Atom PendingAtom { get; set; }
public Dictionary<Atom, HashSet<Bond2D>> BondMap { get; set; } = new();
private Viewer PanelViewer { get; set; }
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
GlobalScene.CompoundConstructor = this;
HeterogeneousMixture = new();
HomogeneousMixture = HeterogeneousMixture.AddLayer();
PanelViewer = GetNode<Viewer>("Viewer");
}
private static class AtomPositionFixMemory
@@ -214,4 +213,5 @@ public partial class CompoundConstructor : Panel
}
private void ForceClear() => Clear(false);
private void BackToCenter() => PanelViewer.BackToCenter();
}