public void Bind(AtomView other, int electronesCount)
    {
        var binding = Instantiate(Resources.Load <GameObject>("Prefabs/Binding")).GetComponent <Binding>();

        binding.first           = this;
        binding.electronesCount = electronesCount;
        binding.second          = other;
        bindings.Add(binding);
        electrons.Take(electronesCount).ForEach((electrone) => electrone.gameObject.SetActive(false));
    }
Beispiel #2
0
 public void UnregisterAtom(AtomView atom)
 {
     moleculesGraphModel.RemoveAtom(atom);
     recalculate = true;
 }
Beispiel #3
0
 public void RegisterAtom(AtomView atom)
 {
     moleculesGraphModel.AddAtom(atom);
     recalculate = true;
 }
 public void RemoveAtom(AtomView atom)
 {
     atoms.Remove(atom);
 }
 public void AddAtom(AtomView atom)
 {
     atoms.Add(atom);
 }