// Start is called before the first frame update void Start() { mcType = MagicCircleType.Form; mySpriteRenderer = GetComponent <SpriteRenderer>(); mySpriteRenderer.color = Color.black; if (spellParent.autoLinkMagicCircle && spellParent.initialMagicCircle != null) { MagicCircleDataLinks link = (MagicCircleDataLinks)spellParent.AddLink(LinkTypes.Data); link.source = spellParent.initialMagicCircle; link.destination = this; link.selectedProperty = "GetMagic"; link.selectedLinkableProperty = "formableMagic"; link.UpdateSourceAndDestination(); link.link = true; spellParent.initialMagicCircle.autoActivate = false; spellParent.mcmm.UpdateWithCreatedLink(link); // formableMagic.SetLinkedValue( emc.GetMagic ); } }
// Start is called before the first frame update void Start() { mcType = MagicCircleType.Movement; mySpriteRenderer = GetComponent <SpriteRenderer>(); mySpriteRenderer.color = Color.green; // if( autoLinkToElementMagic && mcParent.Contains( (int)MagicCircleType.Element ) ) // { // Debug.Log("Linked Movement to Element"); // ElementMagicCircle emc = mcParent.GetMagicCircle( (int)MagicCircleType.Element ) as ElementMagicCircle; // movableMagic.SetLinkedValue( emc.GetMagicObject ); // } if (spellParent.autoLinkMagicCircle && spellParent.initialMagicCircle != null) { MagicCircleDataLinks link = (MagicCircleDataLinks)spellParent.AddLink(LinkTypes.Data); link.source = spellParent.initialMagicCircle; link.destination = this; link.selectedProperty = "GetMagicObject"; link.selectedLinkableProperty = "movableMagic"; link.UpdateSourceAndDestination(); link.link = true; spellParent.mcmm.UpdateWithCreatedLink(link); // formableMagic.SetLinkedValue( emc.GetMagic ); } }