예제 #1
0
 public void Initialize(ComponentsHolder holder, ComponentDefs type, tk2dSprite sprite, tk2dSpriteAnimator animator)
 {
     this.holder   = holder;
     this.type     = type;
     this.sprite   = sprite;
     this.animator = animator;
     this.sprite.ignoreMaterialChange = true;
 }
예제 #2
0
        private void Awake()
        {
            componentsHolder       = gameObject.transform.Find(GameObjectElements.ComponentsHolder.ToString()).gameObject.AddComponent <ComponentsHolder>();
            componentsHolder.owner = this;
            componentsHolder.AddComponents();

            hudContainer = gameObject.transform.Find(GameObjectElements.HUDContainer.ToString()).transform;

            motor2D = GetComponent <Motor2D>();

            mountPoints = new List <MountPoint2D>();

            blinkEffectScripts = gameObject.GetComponentsInChildren <BlinkEffectScript>();

            foreach (MountPoint2D point in transform.GetComponentsInChildren <MountPoint2D>())
            {
                mountPoints.Add(point);
            }

            Initialize();
        }