예제 #1
0
    private void SpawnSplashDamage(Damage dmg, Actor grabbee)
    {
        GameObject go = Instantiate(ResourceManager.Instance.SplashDamage,
                                    grabbee.transform.position,
                                    Quaternion.identity) as GameObject;

        //Swap x and y forces for splash
        dmg.Force = new Vector2(dmg.Force.y, dmg.Force.x);

        SplashDamage splash = go.GetComponent <SplashDamage>();

        splash.Spawn(dmg, new Actor[] { grabbee, Actor }, Actor);
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     targetSys    = GetComponent <Targeting>();
     selfDestruct = GetComponent <SplashDamage>();
     vec          = noTarget;
 }